package cn.tfyhyc.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 头发又黑又长
 * @Date 2022/10/24 15:04
 * @email zwb15083976291@163.com
 */

@RestController
@RefreshScope // 支持Nacos 的动态刷新功能
public class ConfigController {

    @Value("${config.info}")
    private String info;

    @GetMapping("/config/info")
    public String getConfig() {
        return info;
    }

}
